<?php
// +----------------------------------------------------------------------
// | sfadmin - Suifeng Administration
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2020 http://suifeng.tech All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: suifeng <1787585212@qq.com>
// +----------------------------------------------------------------------

namespace app\shop;

class Module
{
    public function module_info()
    {
        return array(
            'name'          =>  'shop',
            'title'         =>  '商店',
            'icon'          =>  'fa fa-cart-plus',
            'description'   =>  '商店模块',
            'developer'     =>  '随风',
            'website'       =>  'http://suifeng.tech',
            'version'       =>  '0.36',
        );
    }

    public function module_config()
    {
        return array(
            'enable_weixin' =>  1,
        );
    }

    public function admin_menu($tree)
    {
        $module_menu = $tree->add('shop', array(
            'title'     =>  '商店',
            'icon'      =>  'fa fa-cart-plus',
            'default'   =>  'shop/admin.goods/index',
        ));

        $store_menu = $module_menu->add('store_mgr', array(
            'title'     =>  '商店管理',
            'icon'      =>  'fa fa-folder-open-o',
        ));

        $store_menu->add('item', array(
            'title'     =>  '商品管理',
            'icon'      =>  'fa fa-gavel',
            'url'       =>  'shop/admin.goods/index',
        ));

        $store_menu->add('category', array(
            'title'     =>  '分类管理',
            'icon'      =>  'fa fa-list',
            'url'       =>  'shop/admin.category/index',
        ));
    }
}